home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / ACORNUSERS / CBSA / EDUCATION / LOADER / h / WimpPoll < prev    next >
Text File  |  1997-12-20  |  2KB  |  90 lines

  1.  
  2. //-----------------------------------
  3. //             WimpPoll.h
  4. //-----------------------------------
  5.  
  6.  
  7. #ifndef WimpPoll_H
  8. #define WimpPoll_H
  9.  
  10. #include "EventData.h"
  11.  
  12. class WimpPoll
  13. {  
  14.   protected:
  15.  
  16.   int mask_event;
  17.   
  18.   union
  19.   {
  20.     int block[128];
  21.     Window_Info Window_Request;
  22.     Mouse_Info Mouse_Click;
  23.     Box Drag_Box;
  24.     Key_Info Key_Pressed;
  25.     Menu_Info Menu_Selection;
  26.     
  27.     struct
  28.     {
  29.       int address;
  30.       int contents;
  31.     } Non_Zero;
  32.     
  33.     Message_Info User_Message;
  34.   }; 
  35.    
  36.   public:
  37.   
  38.   enum Events
  39.   {
  40.     ENULL,
  41.     EREDRAW,
  42.     EOPEN,
  43.     ECLOSE,
  44.     EPTRLEAVE,
  45.     EPTRENTER,
  46.     EBUT,
  47.     EUSERDRAG,
  48.     EKEY,
  49.     EMENU,
  50.     ESCROLL,
  51.     ELOSECARET,
  52.     EGAINCARET,
  53.     EPOLLNONZERO,
  54.     ESEND = 17,
  55.     ESENDWANTACK = 18,
  56.     EACK = 19
  57.   };
  58.   
  59.   WimpPoll();
  60.   virtual ~WimpPoll();
  61.   
  62.   void EnableEvent(Events);
  63.   void DisableEvent(Events);
  64.   
  65.   virtual bool NullEvent()     { return FALSE; }
  66.   virtual bool OpenWindow()     { return FALSE; }
  67.   virtual bool CloseWindow()     { return FALSE; } 
  68.   virtual bool RedrawWindow()     { return FALSE; }
  69.   virtual bool PointerLeave()     { return FALSE; }
  70.   virtual bool PointerEnter()     { return FALSE; }
  71.   virtual bool ButtonPressed()     { return FALSE; }
  72.   virtual bool UserDrag()     { return FALSE; }
  73.   virtual bool KeyPressed()     { return FALSE; }
  74.   virtual bool MenuSelected()     { return FALSE; }
  75.   virtual bool Scrolled()     { return FALSE; }
  76.   virtual bool LoseCaret()     { return FALSE; }
  77.   virtual bool GainCaret()     { return FALSE; }
  78.   virtual bool PollNonZero()     { return FALSE; }
  79.   virtual bool SendMsg()     { return FALSE; }
  80.   virtual bool SendMsgAck()     { return FALSE; }
  81.   virtual bool Acknowledge()    { return FALSE; }
  82.   
  83.   virtual void run();
  84. };
  85.  
  86. #endif
  87.  
  88.  
  89.  
  90.